package cn.pfz.search.domain;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * @Author: 普发忠
 * @Date: 2021/10/20/9:13
 */
@Data
@Document(indexName = "wolf2w_userinfo",type="_doc")
public class UserInfoEs implements Serializable {
    public static final String INDEX_NAME = "wolf2w_userinfo";

    public static final String TYPE_NAME = "_doc";
    @Id
    @Field(store = true, index = false, type = FieldType.Long)
    private Long id;
    @Field(store = true, index = true, type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String nickname;
    @Field(store = true, index = true, type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String city;
    @Field(store = true, index = true, type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String info;
}
